1. Field of the Invention
The present invention relates to an image coding apparatus and an image coding method and, more particularly, to techniques of controlling a loop filter in an image coding apparatus and an image coding method, which employ the H.264 image coding system.
2. Description of the Related Art
Coding systems, such as Motion-JPEG (Joint Photographic Experts Group), MPEG-1 (Moving Picture Experts Group), and MPEG-2, have been established as techniques for highly efficiently coding moving images. Each manufacturer has developed and commercialized image capture apparatuses, such as a digital still camera and a digital video camera, and DVD (digital versatile disk) recorders, which utilize these coding systems and are thus capable of storing moving images. Users can easily view moving images by using these apparatuses, personal computers, or DVD players.
Meanwhile, an amount of data representing digitalized moving images is enormous. Thus, studies of a moving image coding system capable of achieving higher compression of moving images than the MPEG-1 and the MPEG-2 have been being conducted. Recently, ITU-T (International Telecommunication Union—Telecommunication sector) and ISO (International Organization for Standardization) have developed the H.264 standard and the MPEG-4 Part 10 standard, respectively, which are technically identical, as the standard of such a coding system.
The H.264 image coding system is briefly described below by referring to a block diagram of FIG. 9, which shows an image coding apparatus employing the H.264 image coding system. As shown in FIG. 9, the image coding apparatus includes a subtracter 101, an integer transform unit 102, a quantization unit 103, an entropy coding unit 104, an inverse quantization unit 105, an inverse integer transform unit 106, an adder 107, frame memories 108 and 111, an intra prediction unit 109, a loop filter 110, an inter prediction unit 112, a motion detection unit 113, and a switch 114. This apparatus codes input image data and outputs coded data.
The image coding apparatus divides input image data into a plurality of blocks each including a predetermined number of pixels, and performs coding in units of blocks. First, the subtracter 101 subtracts predicted image data from the input image data, and then outputs residual image data. The creation of the predicted image data will be described later.
The integer transform unit 102 performs orthogonal transform on the residual image data output from the subtracter 101, and then outputs transform coefficients. Subsequently, the quantization unit 103 quantizes the transform coefficients by using a predetermined quantization parameter.
The entropy coding unit 104 receives the transform coefficients quantized by the quantization unit 103, and then entropy-codes the received transform coefficients. Subsequently, the entropy coding unit 104 outputs the entropy-coded transform coefficients as coded data.
On the other hand, the transform coefficients quantized by the quantization unit 103 are also used to generate the predicted image data. The inverse quantization unit 105 inverse-quantizes the transform coefficients quantized by the quantization unit 103. Then, the inverse integer transform unit 106 performs inverse-integer-transform of the transform coefficients inverse-quantized by the inverse quantization unit 105, and outputs resultant data as decoded residual image data. Subsequently, the adder 107 adds the decoded residual image data and the predicted image data, which will be described later. Then, the adder,107 outputs a result of the addition as reconstructed image data.
The reconstructed image data is stored in the frame memory 108, and is also filtered by the loop filter 110 to remove noise. The filtered data is stored in the frame memory 111. Among the reconstructed image data, the data, which may be referred to in a subsequent prediction process, is stored in the frame memory 108 or 111 for a period of time.
The intra prediction unit 109 performs an intra prediction process by using the reconstructed image data stored in the frame memory 108 to create predicted image data. The inter prediction unit 112 performs an inter prediction process according to motion vector information concerning a motion vector, which is detected by the motion detection unit 113, by using the reconstructed image data stored in the frame memory 111. Thus, the inter prediction unit 112 generates predicted image data. The motion detection unit 113 detects a motion vector in the input image data, and outputs motion vector information about the detected motion vector to the inter prediction unit 112 and the entropy coding unit 104.
The switch 114 is a selection unit operative to select one of the intra prediction unit 109 and the inter prediction unit 112. That is, the switch 114 selects one of an output of the intra prediction unit 109 and an output of the inter prediction unit 112. Then, the switch 114 outputs predicted image data, which is the selected output of the prediction unit 109 or 112, to the subtracter 101 and the adder 107.
The H.264 standard prescribes that an image coding apparatus has a loop filter operative to perform a filtering process on a locally decoded image differently from the MPEG-1 standard and the MPEG-2 standard. The configuration of the loop filter 110 is described more specifically next.
The loop filter 110 performs smoothing on the boundaries among 4×4 pixel blocks or 16×16 pixel blocks. Thus, the loop filter 110 has advantages that block distortions in the decoded image are removed, and that block distortions in the decoded image are prevented from being transmitted to an image by motion compensation using the decoded image as a reference image. In conformity to the H.264 standard, the strength of a loop filtering process to be performed by the loop filter is controlled according mainly to a quantization value called a Q-value. Also, the strength of the loop filtering process to be performed by the loop filter can be changed according to two parameters “slice_alpha_c0_offset_div2” and “slice_beta_c0_offset_div2” included in a slice header of a slice, into which an image is divided, in units of a slice.
For example, Japanese Patent Application Laid-Open Nos. 6-311499 and 9-187005 disclose related techniques of controlling a filtering process in an encoder.
According to the technique disclosed in Japanese Patent Application Laid-Open No. 6-311499, to use a differential image between an input image and a motion-compensated image as predicted image data, it is determined by using DCT (Discrete Transform Cosine) coefficients obtained through inverse-quantization, that is, DCT coefficients of decoded residual image data whether a distortion occurs. The strength of a filtering process to be performed on the decoded residual image data is controlled according to the magnitude of the distortion. Thus, adaptive removal of distortions is performed.
According to the technique disclosed in Japanese Patent Application Laid-Open No. 9-187005, a quantization scale is changed according to the intensity at an edge of an input image. When the quantization scale is small, a filtering process is performed on DCT coefficients, which are obtained by performing DCT transform on an input image, so as to suppress an increase in an amount of code.
Meanwhile, as described above, in conformity to the H.264 standard, the loop filtering process to be performed by the loop filter is controlled according to the quantization value called the Q-value.
However, the Q-value changes according to buffer capacity. Therefore, the loop filter is not necessarily controlled to reflect human visual characteristics for an image.
Additionally, the filtering-process control method disclosed in Japanese Patent Application Laid-Open No. 6-311499 uses only the DCT coefficients of the decoded residual image data to determine whether a distortion occurs, instead of the reconstructed image data obtained by adding the predicted image data and the decoded residual image data. Thus, the visual characteristics are not reflected in the filtering process. Further, an apparatus disclosed in Japanese Patent Application Laid-Open No. 9-187005 performs a filtering process so as to suppress an increase in an amount of code when the quantization scale is small. However, this apparatus does not perform the filtering process according to the characteristics of an input image. Thus, the filtering process does not reflect the human visual characteristics. That is, the related method and apparatus do not control the filtering process to be suited to the human visual characteristics for an image. Consequently, the related method and apparatus have a drawback in that it is difficult to obtain an image having good quality.